package service.util
{
	public class XMLTemplate
	{
		public function XMLTemplate(enforcer:SingletoneEnforcer) {
			if (enforcer == null) {
				throw new Error();
			}
		}
		
		public static function getLoginTemplate():XML {
			var template:String = 	<Request>
										<Action name="Login" />
										<Content>
											<Username />
											<Password />
										</Content>
									</Request>;

			return new XML(template);
		}
		
		public static function getLogoutTemplate():XML {
			var templateOut:String = <Request>
									<Action name="Logout" />
									<Content>
										<Session />
									</Content>
								  </Request>;
			return new XML(templateOut);
		}
		
		public static function getDomainTemplate():XML {
			var template:String = <Request>
									<Action name="Get All Snippet Domains" />
									<Content>
										<Session />
									</Content>
								  </Request>;
			return new XML(template);
		}
		
		public static function getAddSnippetTemplate():XML {
			var template:String = <Request>
									<Action name="Add Snippet Article" />
									<Content>
										<Session />
										<Article />
									</Content>
								  </Request>;
			return new XML(template);
		}
		
		public static function getAllSnippetTemplate():XML {
			var template:String = <Request>
									<Action name="Get All Snippet Articles" />
										<Content>
											<Session />
										</Content>
								   </Request>;
			return new XML(template);
		}
	}
}

class SingletoneEnforcer {}